// rem布局
function rem(){
    document.documentElement.style.fontSize=document.documentElement.clientWidth/10.8+'px'
}
rem()
window.onresize=rem

//页面加载
$(function(){
    //swiper
    new Swiper('#banner',{
        // autoplay:1000,
        loop:true,
        pagination:'.swiper-pagination',
    })

    new Swiper('#bannerNav',{
        loop:true,
        pagination:'.swiper-pagination',
    })

    //滑动
    new IScroll('#box')
    new IScroll("#header-nav",{scrollY:false,scrollX:true})

    $('#header-nav>ul>li').tap(function(){
        $(this).addClass('header-nav-active').siblings().removeClass('header-nav-active')
    })
})